# Patterns are associated with a FPEntity, and generate fpchecks
		
from FPCheck import *

class FPPattern(object):
	pattern=''
	value=1
	type=''
	def __init__(self,pattern,value,type):
		self.pattern=pattern
		self.value=value
		self.type=type

	def get_fpcheck(self):
		if self.type=="str" or self.type=="string":
			return FPString(self.pattern)
		elif self.type=="regex" or self.type=="regexp":
			return FPRegex(self.pattern)

